package com.quanyue.haircut.order.service;

import com.github.binarywang.wxpay.bean.notify.WxPayOrderNotifyResult;
import com.quanyue.haircut.domain.entity.User;
import me.chanjar.weixin.common.exception.WxErrorException;

import java.math.BigDecimal;
import java.util.Map;

public interface PayService {
    /**
     * 支付.
     *
     * @param merchantNo 商户号
     * @param price      支付的金额
     * @param orderNo    订单号
     * @param user       用户信息
     * @param userIp     用户的IP
     * @return 支付参数
     */
    Map<String, String> pay(String orderType, Integer merchantNo, BigDecimal price, String orderNo, User user, String userIp);

    void handlePayConfirm(WxPayOrderNotifyResult result) throws WxErrorException;
}
